#ifndef MAP_HPP
#define MAP_HPP

#include <QPixmap>
#include "mapview.hpp"

enum word_type {
   WORD,
   NUMBER,
};

class Map : public QObject {
	Q_OBJECT

	public:
		Map(MapView *mapview = 0);
		void clear();

		// Methode pour le Wrapper
		bool seekWord(QString &line, QString word);
		void OpenMap();
		MapView* getMapView();
		QString getPathBackground();
		QString getPathMusic();
		QString getName();
		QString getComment();
		QString getAuthor();
		bool hasChanged();

		// Methode Set
		void setMapView(MapView *mapview);
		bool save();
		void setName(QString name);
		void setComment(QString comment);
		void setAuthor(QString author);
		void setPathBackground(QString path_background);
		void setPathMusic(QString path_music);
		void setChanged(bool hasChanged);

	public slots:
		void changed();

	private:
		MapView *_mapview;
		QString _author;			// Auteur de la map
		QString _comment;			// Commentaire au sujet de la map
		QString _name;				// nom de la map
		QString _backgroundPath;
		QString _musicPath;
		bool _hasChanged;				// Booléen afin de savoir si la map à été enregistré
};

#endif // MAP_HPP
